package com.lagou.edu.dao;

import com.lagou.edu.pojo.AuthCode;
import com.lagou.edu.pojo.Resume;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface AuthCodeDao extends JpaRepository<AuthCode,Long> {


    @Query(value = "select *\n" +
                    "from lagou_auth_code\n" +
                    "where email = ?1\n" +
                    "order by expiretime desc\n" +
                    "limit 1",
            nativeQuery = true)
    AuthCode findAuthCode(String email);

}
